import { createApp } from 'vue';
import App from './App.vue';
import router from '@/router';
import stepin from 'stepin/es';
import pinia from '@/store';
import '@/mock';


// 全局引用央视
import '@/styles/main.css';


// 生产打包时可去除 ant-design-vue/dist/antd.variable.less 的引用。
// 开发引入此包是为了加载优化，防止首次打开页面过慢
import 'ant-design-vue/dist/antd.variable.less';
import 'stepin/es/style';
// import 'default-passive-events';
import '@/theme/index.less';
import { AuthPlugin, IconfontPlugin } from '@/plugins';

// vuetify start
// Vuetify
import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import '@mdi/font/css/materialdesignicons.css';
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
const vuetify = createVuetify({
  theme: {
        themes: {
            light: {
                dark: false,
                colors: {
                    primary: '#039BE5', // #E53935 6B38FB 1C1E2C 7F85F9
                    success: '#43A047',
                    warning: '#FF6F00',
                    error: '#FF1744',
                    selfColor: '#FF3D00',
                    
                  },
                },
                dark:{
                  dark: true,
                  colors: {
                    primary: '#01579B', // #E53935 6B38FB 1C1E2C 7F85F9
                    success: '#00C853',
                    warning: '#FF8F00',
                    error: '#D50000',
                    selfColor: '#FF8A65',
                },
            },
        },
    },
    icons: {
        defaultSet: 'mdi',
        sets: {},
    },
  components,
  directives,
})
// vuetify end

const app = createApp(App);



app.use(pinia);
app.use(router);
app.use(vuetify);
app.use(stepin, { router });
app.use(AuthPlugin, { action: 'disable' });
// iconfont 插件。url为你的 iconfont 图标资源地址（你的iconfont 仓库可获取此地址）
app.use(IconfontPlugin, { url: '//at.alicdn.com/t/c/font_3805284_ulvha6ct7d.js' });
app.config.errorHandler = function (err) {
  console.error('未捕获的异常，', err);
};
app.mount('#stepin-app');
